﻿namespace eAtlantida.Tools.Operations
{
    public class ConnectionOperation : Operation
    {
        public const string Name = "connection";

        public override void Execute(State state)
        {
            if (string.IsNullOrWhiteSpace(state.ConnectionString))
            {
                WriteMessage("Connection string is not defined! Type 'connect %connectionString%' for definition connection.", MessageType.Warning);
            }
            else
            {
                WriteMessage("Connection string: " + state.ConnectionString, MessageType.Info);
            }
        }
    }
}